package com.lvy.hczn.front.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lvy.hczn.front.system.domain.business.GoodsBox;
import com.lvy.hczn.front.system.domain.business.SpuSortRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsBoxMapper extends BaseMapper<GoodsBox> {

    /**
     * 同一供应商，同一批次的同一商品合并，切合并箱子内不能包含其他供应商的相同品类
     * （如：合并A供应商的苹果，且是合并A供应商的同一批次的苹果，且要合并入库
     * 的箱子中，不能含有其他供应商的苹果这个品类），且是操作人员触发一次，合并一箱
     *
     * @return
     * @author yw
     * @date 2022-05-10 13:51:12
     */
    List<GoodsBox> selectMergeBox(@Param(value = "goodsBox") GoodsBox goodsBox);

    List<GoodsBox> selectTransferSortDoneByOutBoundOrderCode(@Param(value = "goodsBox") GoodsBox goodsBox);

    /**
     * 退货入库下架货箱
     *
     * @param goods
     * @return
     * @author yw
     * @date 2023-09-13 22:31:16
     */
    List<GoodsBox> downloadReturnBox(@Param(value = "goodsBox") GoodsBox goods, @Param(value = "temperZoneList") List<Integer> temperZoneList);

    /**
     * 临期报损出库下架货箱
     *
     * @param goods
     * @return
     * @author yw
     * @date 2023-09-13 22:31:16
     */
    List<GoodsBox> downloadFrmLossBox(@Param(value = "goodsBox") GoodsBox goods, @Param(value = "spuSortRecord") SpuSortRecord spuSortRecord);

    /**
     * 临期报损查询货箱
     *
     * @param spuSortRecord
     * @return
     * @author yw
     * @date 2023-09-13 22:31:16
     */
    List<GoodsBox> selectFrmLossList(@Param(value = "spuSortRecord") SpuSortRecord spuSortRecord);

    /**
     * 查询货箱信息列表
     *
     * @param goodsBox 货箱信息
     * @return 货箱信息集合
     */
    List<GoodsBox> selectGoodsBoxList(GoodsBox goodsBox);
}
